Add vault payment commands - #244
Merged
Merged
Conversation
hiroTamada
approved these changes
Sep 4, 2026
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add vault payment commands for Link and AgentCard. The CLI prepares payment credentials, displays provider actions and payment-method choices, attaches vaults to new browsers, and observes item state/events. It does not submit merchant payments.
Current interface
create --name,list,get <vault>,delete <vault>.wallets create <vault> <key> --provider link|agentcard --spec '<json>' [--open];wallets payment-methods <vault> <key>.cards create|update <vault> <key> --provider link|agentcard --spec '<json>'.items list,items get [--wait 0..60] [--expand payment_methods] [--open],items invoke <vault> <key> <operation> [--open],items events [--after <event-id>] [--wait 0..60], anditems delete.browsers create --vault <id-or-name>; repeatable, up to 20 vaults, incompatible with pools.The
wallets,cards, anditemscommands are underkernel vaults. Vault selectors accept an ID or name; item selectors currently use the immutable key.--project/KERNEL_PROJECTis optional: omitted scope is resolved by the API, using the default project for org-wide credentials rather than listing all projects.Specifications and behavior
--specis a JSON specification object, not a{type, spec}envelope. The command supplies the item type and injectsprovider; an embedded provider must match the flag. Provider-specific flags have been removed. JSON values are passed through the SDK without defaults, normalization, or integer precision loss; the API validates required and optional fields. This includes Link purchase details, metadata, and expiry. Card updates replace the entire spec, including removing omitted optional fields.Help includes provider-specific types and examples, with a sync comment linking to the published API spec. The README covers both provider flows, expansion syntax, updates, and lifecycle behavior.
items getshows operation types/descriptions and shell-quoted copyable commands retaining the selected project.items invokeGETs the item again, checks the requested type againstavailable_operations, then POSTs{"type":"<operation>"}to/operations. Availability is API-controlled, without local item/provider/state rules or an operation registry. It prints the updated item and supports--openand-o json. Requests do not automatically retry; waits are bounded observations, not readiness/payment guarantees.{"type":"authorize"}and forbids extra fields; no operation--specflag is added. Future parameterless operations can be invoked by name when advertised. The dedicatedcards authorizecommand is removed without an alias.-o json; output preserves public fields and aliases while filtering unknown/opaque provider data and credential-bearing action URLs.Deleted or not found; other errors fail. Existing non-vault delete commands are unchanged.SDK
Use published
github.com/kernel/kernel-go-sdk v0.100.0. The preview replacement and checksums are removed. CI no longer needs a private SDK token or GOPRIVATE configuration, and Go caching is restored. Nine existing browser SDK call sites use the released SDK'sIDOrNamepath-field spelling.No SDK repository files were changed.
Verification
make testandmake buildpass locally; vault tests also pass with-race. All four README--specexamples parse as JSON objects.golangci-lint run --new-from-rev=origin/main: 0 issues.go mod verifypasses. README and repository Markdown docs contain no card-mode references.